<template>
	<view class="page" style="padding: 3% 3%;">
		<Navbar title="个人基本信息"></Navbar>
		<view class="form">
			<view class="form-data">
				<view class="label">姓名：</view>
				<view class="u-flex value"> {{ detailData.Name ||'' }} </view>
			</view>
			<view class="form-data">
				<view class="label">出生年月：</view>
				<view class="u-flex value"> {{ detailData.BirthDate ||'' }} </view>
			</view>
			<view class="form-data">
				<view class="label">户籍地址：</view>
				<view class="u-flex value"> {{ detailData.DomicilePlace ||'' }} </view>
			</view>
			<view class="form-data">
				<view class="label">现住地址：</view>
				<view class="u-flex value"> {{ detailData.Address ||'' }} </view>
			</view>
			<view class="form-data">
				<view class="label">身高：</view>
				<view class="u-flex value"> {{ detailData.Height ||'' }} </view>
			</view>
			<view class="form-data">
				<view class="label">学历：</view>
				<view class="u-flex value"> {{ detailData.Education ||'' }} </view>
			</view>
			<view class="form-data">
				<view class="label">工作年限：</view>
				<view class="u-flex value"> {{ detailData.WorkExp ||'' }} 年 </view>
			</view>
			<view class="form-data">
				<view class="label">工作经历：</view>
				<view class="u-flex value"> {{ detailData.WorkExperience ||'' }} </view>
			</view>
			<!-- <view class="form-data">
				<view class="label">性格特征：</view>
				<view class="u-flex value"> {{ detailData.Name ||'' }} </view>
			</view> -->
			<view class="form-data">
				<view class="label">家庭情况：</view>
				<view class="u-flex value"> {{ detailData.Comment ||'' }} </view>
			</view>
			<view class="form-data">
				<view class="label">岗位类型：</view>
				<view class="u-flex value"> {{ detailType == '1'?'保姆':'保洁' }} </view>
			</view>
			<view class="form-data">
				<view class="label">状态：</view>
				<view class="u-flex value"> {{ detailData.Status == '0'?'空闲':'忙碌' }} </view>
			</view>
		</view>

		<view style="height: 200rpx;"></view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				formData: {
					// 城市
					// 手机号码
					// 真实姓名
					// 身份证号码
					// 性别
					// 出生日期
					// 籍贯
					// 学历
					// 民族
					// 婚姻状况
					// 家庭住址
					// 岗位类型
					// 工作能力
					// 工作经验
					// 期望每月工资
					// 期望每月休息天数
					// 个人特长
					// 自我介绍
					city: '',
					tel: '',
					came: '',
					idNo: '',
					gender: '',
					birthDate: '',
					dDomicilePlace: '',
					education: '',
					nation: '',
					mMaritalStatus: '',
					address: '',
					workingType: '',
					abilityType: '',
					workExp: '',
					wWage: '',
					restDays: '',
					speciality: '',
					comment: ''
				},
				radioList: [{
						name: '女'
					},
					{
						name: '男'
					}
				],
				sex: '男',
				showTime: false,
				paramsTime: {
					year: true,
					month: true,
					day: true,
					hour: false,
					minute: false,
					second: false
				},
				showRegion: false,
				showEducation: false,
				educationList: [{
						value: '1',
						label: '本科'
					},
					{
						value: '2',
						label: '大专'
					},
					{
						value: '3',
						label: '高中'
					},
					{
						value: '4',
						label: '初中'
					},
					{
						value: '5',
						label: '小学'
					}
				],
				showNation: false,
				nationList: [{
						value: '1',
						label: '汉族'
					},
					{
						value: '2',
						label: '维吾尔族'
					},
					{
						value: '3',
						label: '壮族'
					},
					{
						value: '4',
						label: '回族'
					},
					{
						value: '5',
						label: '其它民族'
					}
				],
				showMarriage: false,
				marriageList: [{
						value: '1',
						label: '已婚'
					},
					{
						value: '2',
						label: '未婚'
					}
				],
				detailType: undefined,
				detailId: undefined,
				detailData: {},
			};
		},
		onLoad(e) {
			this.detailType = e.type;
			this.detailId = e.id;
			this.getDetail();
		},
		methods: {
			getDetail() {
				if (this.detailType == 1) {
					// 保姆
					this.$u.api.AppEmpInfo({
						id: this.detailId
					}).then(res => {
						this.detailData = res?.data ?? {};
					});
				} else {
					// 保洁
					this.$u.api.PurifierInfo({
						id: this.detailId
					}).then(res => {
						this.detailData = res?.data ?? {};
					});
				}
			},
		}
	};
</script>

<style lang="scss" scoped>
	.page {
		background-color: #f4f5f7;
	}

	.form {
		padding: 10rpx 20rpx 20rpx;
		background-color: #fff;
	}

	.form-data {
		position: relative;
		margin-bottom: 20rpx;
		border-bottom: 2rpx solid #dcdcdc;

		&:last-child {
			border: none;
		}

		.label {
			font-size: 28rpx;
			font-weight: 600;
		}

		.value {
			height: 70rpx;
		}

		.get-phone {
			position: absolute;
			bottom: 15rpx;
			right: 20rpx;
			color: $u-type-primary;
		}
	}

	.footer-button {
		position: fixed;
		left: 0;
		bottom: 0;
		width: 100%;
		height: 98rpx;
		padding: 13rpx 20rpx;
		background-color: #ffffff;

		image {
			width: 58rpx;
			height: 58rpx;
			margin-right: 30rpx;
		}
	}
</style>